package com.scujj.utils;

import com.scujj.controller.impl.ChatSocketControllerImpl;
import com.scujj.service.ChatRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class WebSocketUtil {
    @Autowired
    private ChatRecordsService chatRecordsService;
    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    @PostConstruct
    public void preInit() {
        ChatSocketControllerImpl.chatRecordsService = chatRecordsService;
        ChatSocketControllerImpl.stringRedisTemplate = stringRedisTemplate;
    }
}
